package com.test.finkcdc.config;

import com.alibaba.druid.pool.DruidDataSource;

import java.io.IOException;
import java.util.Properties;

public class TargetConfig {
    public static final String URL="jdbc:postgres:thin:@192.168.1.100:5432/test?targetServerType=primary&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&rewriteBatchedStatements=true&reWriteBatchedInserts=true&stringtype=unspecified&preferQueryMode=extendedForPrepared&useServerPrepStmts=true";
    public static final String DRIVER_NAME="org.postgresql.Driver";
    public static final String USER_NAME="";
    public static final String PASSWORD="";
    public static DruidDataSource dataSource;
    static{
        Properties prop=new Properties();
        try {
            prop.load(TargetConfig.class.getResourceAsStream("druid.properties"));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        dataSource=new DruidDataSource();
        dataSource.setConnectProperties(prop);
    }
}
